<?php
use app\model\Poster;

if (sprintf("%.2f",floatval($_P['joinfee']))!=='0.00') {
    $formtextcenterxcx = $_P['formtextcenterxcx'];
    $formtextcenter2xcx = $_P['formtextcenter2xcx'];
    $formtextcenter3xcx = $_P['formtextcenter3xcx'];
    $formtextcenternewxcx = $_P['formtextcenternewxcx'];
    $formtextrightxcx = $_P['formtextrightxcx'];
}else{
    $formtextcenterxcx = str_replace("#fee","#tuan",$_P['formtextcenterxcx']);
    $formtextcenter2xcx = str_replace("#fee","#tuan",$_P['formtextcenter2xcx']);
    $formtextcenter3xcx = str_replace("#fee","#tuan",$_P['formtextcenter3xcx']);
    $formtextcenternewxcx = str_replace("#fee","#tuan",$_P['formtextcenternewxcx']);
    $formtextrightxcx = str_replace("#fee","#tuan",$_P['formtextrightxcx']);
}
$config['video_show_left']  = $_P['video_show_left'];
$tempconfig=array(
    'addworkerurlxcx'    =>$config['addworkerurlxcx'],
    'indexurlxcx'    =>$config['indexurlxcx'],
    'getavatar'      => max(1,intval($_P['getavatar'])),
    'comment_on_off'      => intval($_P['comment_on_off']),
    'getmobile'      => intval($_P['getmobile']),
    'formtextleftxcx'    => trim($_P['formtextleftxcx']),
    'formtextcenterxcx'    => $formtextcenterxcx,
    'formtextcenter2xcx'    => $formtextcenter2xcx,
    'formtextcenter3xcx'    => $formtextcenter3xcx,
    'formtextcenternewxcx'    => $formtextcenternewxcx,
    'formtextrightxcx'    => $formtextrightxcx,
    'sharetitlexcx'=> trim($_P['sharetitlexcx']),
    'sharetitlexcx2'=> trim($_P['sharetitlexcx2']),
    'shareimgxcx'    => tomedia($_P['shareimgxcx']),
    'contentxcx'     => Poster::getContentvideoimg($config,$tuwen['content']),
    'livecontentxcx'     =>  Poster::getContentvideoimg($config,$tuwen['livecontent']),
);
$config =array_merge($config,$tempconfig);
if ($system['live']==1){
    $tempconfig=array(
        'livedata' => array(
            'liveid' =>  intval($_P["lid"]),
            'livetime' => strtotime($_P["livetime"]),
            'lname' => trim($_P['lname']),
            'relive' => trim($_P['relive']),
            'livestatus' => intval($_P['livestatus']),
            'sendnotify' => trim($_P['sendnotify']),
            'yure' => intval($_P['yure'])
        ),
        'liveheadlogo'    => $tuwen['liveheadlogo'],
        'livecontent'     => $tuwen['livecontent'],
    );
    $config =array_merge($config,$tempconfig);
}